lock and unlock screen(back functionality)