Trying to create a simple character controller

Hi, i am trying to create a simple custom character controller but i am having a little problem wit movemt. I want to have the standart WSAD control, also move diagonal with W+A and so on, rotate with QE buttons, but also when i am done rotating W has to move me in the direction the camera is facing.
Here is my code so far

public class PlayerMovement : MonoBehaviour {

public float movementSpeed = 5f;
public float rotationSpeed = 3f;
public float jumpForce = 5f;

float moveHorizontal;
float moveVertical;
Rigidbody rigbody;

void Awake()
{
    rigbody = GetComponent<Rigidbody>();
}

void FixedUpdate()
{
    moveHorizontal = Input.GetAxis("Horizontal");
    moveVertical = Input.GetAxis("Vertical");

    if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.D))
    {
        Move(moveHorizontal, moveVertical);
    }

    if (Input.GetKey(KeyCode.Q))
    {
        Rotation(-transform.up);
    }

    if (Input.GetKey(KeyCode.E))
    {
        Rotation(transform.up);
    }

    if (Input.GetKey(KeyCode.Space) && !(transform.position.y > 1))
    {
        rigbody.AddForce(transform.up * jumpForce);
    }
}

void Move(float moveHorizontal, float moveVertical)
{
    Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
    rigbody.MovePosition(transform.position + movement * movementSpeed * Time.deltaTime);
}

void Rotation(Vector3 direcion)
{
    //transform.Rotate(direcion * Time.deltaTime * rotationSpeed);
    Quaternion deltaRotation = Quaternion.Euler(direcion * Time.deltaTime);
    rigbody.MoveRotation(rigbody.rotation * deltaRotation);
}

}

everything works fine execpt the rotation. After i rotate the W moves me in the same direction as before the rotation

if (Input.GetKey(Keycode.W)) transform.position = transform.forward * movementSpeed * Time.deltaTime;
if (Input.GetKey(Keycode.S)) transform.position = -transform.forward * movementSpeed * Time.deltaTime;
if (Input.GetKey(Keycode.D)) transform.position = transform.right * movementSpeed * Time.deltaTime;
if (Input.GetKey(Keycode.A)) transform.position = -transform.right * movementSpeed * Time.deltaTime;